import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home.vue'

Vue.use(VueRouter)

export default new VueRouter({
    routes: [
        {
            path: '/',
            name: 'home',
            component: Home,
            redirect: '/index',
            children: [
                {
                    path: 'index',
                    name: 'index',
                    component: () => import('../views/index.vue')
                },
                {
                    path: 'call',
                    name: 'call',
                    component: () => import('../views/call.vue')
                },
                {
                    path: 'user',
                    name: 'user',
                    component: () => import('../views/user.vue')
                },
            ]
        },
        {
            path: '/login',
            name: 'login',
            component: () => import( '../views/login.vue')
        }
    ]
})

